@extends('admin.layout')
@section('content')
<div class="content-wrapper" style="min-height: 946px;">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                职位分类管理
                <small>添加</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i>主页</a></li>
                <li><a href="#">职位分类管理</a></li>
                <li class="active">添加</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-6">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">快速添加职位分类</h3>
                        </div><!-- /.box-header -->
                        {{ session('info') }}
                        @if (count($errors) > 0)
						    <div class="alert alert-danger alert-dismissable">
			                    <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
			                    <h4><i class="icon fa fa-ban"></i> 警告!</h4>
			                    <ol>
						            @foreach ($errors->all() as $k => $error)
						                <li>{{ $error }}</li>
						            @endforeach
						        </ol>
			                  </div>
						   
						@endif
                        <!-- form start -->
                        <form role="form" action="{{ asset('/admin/cate') }}" method="post">
                        {{ csrf_field() }}
                            <div class="box-body">
                                <div class="form-group">
                                    <label for="exampleInputName">职位分类名</label>
                                    <input type="text" name='name' placeholder="请输入6-18位职位分类名" id="exampleInputName" class="form-control">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail">父职位分类</label>
                                    <select name='pid' class="form-control">
                                        <option value="0" >根职位分类</option>
                                        @foreach($data as $k => $cate)
                                        <option value="{{ $cate -> id }}" >{{ $cate -> name }}</option>
                                        @endforeach
                                    </select>
                                </div>
                            </div><!-- /.box-body -->

                            <div class="box-footer">
                                <button class="btn btn-primary" type="submit">添加</button>
                                <button class="btn btn-default" type="reset">重置</button>
                            </div>
                        </form>
                    </div><!-- /.box -->

                </div><!--/.col (left) -->
            </div>   <!-- /.row -->
        </section><!-- /.content -->
    </div>
@endsection